package models;

import java.sql.ResultSet;
import java.sql.SQLException;

public class 
LeadSingerModel 
extends AbstractModel
{	public boolean
	insert(Integer upc, String name)
	{	try{
		ps = con.prepareStatement("INSERT INTO LeadSinger VALUES (?,?)");
		ps.setInt(1, upc);
		ps.setString(2,name);
		return wrapUp();
		} catch(SQLException ex){ return registerException(ex); }
	}
	
	public boolean
	delete(Integer upc, String name)
	{ 	try{
			ps = con.prepareStatement("DELETE FROM LeadSinger WHERE upc = ? AND name = ?");
			ps.setInt(1,upc);
			ps.setString(2,name);
			return wrapUp();
		} catch(SQLException ex){ return registerException(ex); }
	}
	
	public ResultSet
	show()
	{ return super.show("LeadSinger"); }
}
